<template>
      <div class="page-realNameSuccesss">
        <div class="success_of">
          <i class="success" ></i>
        </div>
        <div class="des">实名认证成功</div>
        <div v-if="adlist.length!==0" class="ad"   @click="jumpad(adlist[0].link)"> <img :src="adlist[0].url" alt=""></div>
        <div class="btn" @click="jump()">马上赚钱</div>
      </div>
</template>

<script>
export default {
  data() {
    return {
     adlist:[],
    };
  },
  methods: {
    jumpad(url) {
      var typeStyle = "jumpToEvents";
      var data = {
        result: 0,
        type: typeStyle,
        urlEvents: url,
        share: {}
      };
      if (
        this.Uitis.ua.indexOf("mzapp") !== -1 &&
        (this.Uitis.ua.indexOf("iphone") !== -1 ||
          this.Uitis.ua.indexOf("ipad") !== -1)
      ) {
        this.Uitis.setupWebViewJavascriptBridge(function(bridge) {
          bridge.callHandler("ObjcCallBackJs", JSON.stringify(data), function(
            response
          ) {});
        });
      } else if (
        this.Uitis.ua.indexOf("mzapp") !== -1 &&
        this.Uitis.ua.indexOf("android") !== -1
      ) {
        window.demo.jumpToEvents(JSON.stringify(data));
      }
    },
    jump(){
      this.Uitis.JumpNavite("jumpToProductList");
    }
  },
  created() {
        //广告列表
    this.$http
      .get(this.Interface.getAdList, { params: { adspaceId: 48 } })
      .then(res => {
        if (res.data.success == true) {
          if(res.data.data.list){
            this.adlist = res.data.data.list;
          }
        
        }
      });
  }
};
</script>
<style lang="less">
html {
 background: #fff;
}
.page-realNameSuccesss {
  height: 100%;
  background: #fff;
  .ad{
    text-align: center;
    margin-top: 90px;
    margin: 90px 50px 0px 50px;
  }
.des{
  font-family: "苹方";
  color: #333;
  font-size: 35px;
  text-align: center;
    font-weight: 500;
}
.btn{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 85px;
  background: #5261f7;
  color: #fff;
  text-align: center;
  font-size: 38px;
  font-family: "苹方";
  width: 640px;
  margin: 0 auto;
  margin-top: 80px;
  border-radius: 0px;
}
.img_des{ 
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 496px;height: 97px;;
  top:400px;
}
.reword{
  font-size: 28px;
  font-family: "苹方";
  color: #333;
  text-align: center;
  padding-top: 160px;
  padding-left: 150px;
  font-weight: 500;
  span{color: #ff1e1e;font-family: "DinPro"}
}
  .success_of {
    background: #fff;
    padding: 70px 0 40px 0px;
  }

  .success_of i {
    display: block;
    float: none;
    width: 111px;
    height: 111px;
    margin: 0 auto;
    background-size: contain;
  }
  .success_of .success {
    background-image: url("../../public/imgs/icon_resuccess.png");
  }



  
}
</style>
